const HOST = require('../../../config.js').host

var app = getApp()

Page({

  /**
   * 页面的初始数据
   */
  data: {
    prizes:[],
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.getPrizeList();
    console.log(1234567890)
  },
  getPrizeList()
  {
   let activityId = 1;
   let self = this;
    wx.request({
      url: HOST + 'v1/winrecord/findRecordList/' + app.userId + "," + activityId,
      method:"GET",
      success:function(res)
      {
        if (res.data.sysCode === 1)
        {
          console.log(res.data.data);
          self.setData({
            prizes:res.data.data
          })
        }
      }
    })
  }
})